<%@page pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%String baseUrl = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/"; %>
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.messager.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/bootstrap.min.js"></script>
<jsp:include page="../admin_head.jsp">
	<jsp:param value="用户信息" name="title" />
</jsp:include>
</head>
<body>
	<div class="container-fluid" >
		<div class="row">
			<div class="col-md-2"></div>
			<div class="col-md-8">
				<div class="panel panel-success" align="center">
				<div class="panel-heading">
				<h1>课堂教学质量评价系统</h1><br/>当前用户:${user.nickName }&nbsp;&nbsp;&nbsp;
						当前用户角色：${user.userRole }
				&nbsp;&nbsp;&nbsp;&nbsp;<a href="userlist.action?userId=${user.id }"><button class="btn btn-sm btn-success">首页</button></a>
						<a href="${pageContext.request.contextPath }/user/user.action"> <button class="btn btn-sm btn-danger" > <B> 退出登录 </B> </button> </a></div>
				</div>
			
			<jsp:include page="../user/admin_nav.jsp">
					<jsp:param value="用户界面" name="title" />
				</jsp:include>
				<div class="panel panel-success">
				<div class="panel panel-primary" style="margin-top:15px;margin-left: 300px;width:900px">
					<div class="panel-heading"> <h3 class="panel-title">用户信息</h3> </div>
					<div class="panel-body" >
						<form method="post" action="modUserBySubmit.action">
							<input type="hidden" name="adderId" value="${operator.id }">
							<input type="hidden" name="id" value="${userinfo.id }">
							<div style="width: 400px; margin-left: 230px">
								<div class="input-group">
									<span class="input-group-addon">姓名（必填）</span>
									<input type="text" name="nickName" value="${userinfo.nickName }" class="form-control" placeholder="请输入用户名" required="required">
								</div>
							</div>
							<div style="width: 400px; margin-left: 230px">
								<div class="input-group">
									<span class="input-group-addon">工号(学号) （必填）</span> 
									<input value="${userinfo.userCode }" type="text" name="userCode"  class="form-control" placeholder="请输入用编号" required="required">
								</div>
							</div>
							<div style="width: 400px; margin-left: 230px">
								<div class="input-group" >
									<span class="input-group-addon">职业（必填）</span> 
									<select class="form-control" name="userType" required="required">
										<c:if test="${userRoleList ne null}">
											<c:forEach items="${userRoleList}" var="role" varStatus="vs">
											<c:if test="${userinfo.userType eq role.id }">
											<option value="${role.id}" selected="selected">${role.name}</option>
											</c:if>
											<c:if test="${userinfo.userType ne role.id }">
												<option value="${role.id}" >${role.name}</option>
											</c:if>
											</c:forEach>
										</c:if>
									</select>
								</div>
							</div>
							<div style="width: 400px; margin-left: 230px">
								<div class="input-group" >
									<span class="input-group-addon">所属专业（院系）（必填）</span> 
									<select class="form-control" name="department" required="required">
										<c:if test="${departmentList ne null}">
											<c:forEach items="${departmentList}" var="depart" varStatus="vs">
											<c:if test="${userinfo.department eq depart.id }">
											<option value="${depart.id}" selected="selected">${user.departmentName}</option>
											</c:if>
											<c:if test="${userinfo.department ne depart.id }">
												<option value="${depart.id}" >${depart.name}</option>
											</c:if>
											</c:forEach>
										</c:if>
									</select>
								</div>
							</div>
							<div style="width: 400px; margin-left: 230px">
								<div class="input-group" >
									<span class="input-group-addon">性别（必填）</span> 
									<select class="form-control" name="sex" required="required">
										<c:if test="${userinfo.sex eq 1 }">
											<option value="1" selected="selected">男</option>
										</c:if>
										<c:if test="${userinfo.sex eq 2 }">
											<option value="2" selected="selected">女</option>
										</c:if>
									</select>
								</div>
							</div>
							<div style="width: 400px; margin-left: 230px">
								<div class="input-group" >
									<span class="input-group-addon">邮箱</span> 
									<input value="${userinfo.email }" type="email" name="email" class="form-control" placeholder="请输入邮箱">
								</div>
							</div>
							<div style="width: 400px; margin-left: 230px">
								<div class="input-group" >
									<span class="input-group-addon">电话</span> 
									<input value="${userinfo.phone }" type="number" name="phone" class="form-control" placeholder="请输入电话">
								</div>
							</div>
							<div style="width: 400px; margin-left: 230px">
								<div class="input-group" >
									<span class="input-group-addon">学生简介</span> 
									<input value="${userinfo.introduce }" name="introduce" class="form-control" placeholder="请输入简介">
								</div>
							</div>
							<div style="width: 400px; margin-left: 230px">
								<div class="input-group" >
									<span class="input-group-addon">登录帐号（必填）</span> 
									<input value="${userinfo.username }" name="username" class="form-control" placeholder="请输入登录帐号" required="required">
								</div>
							</div>
							<div style="width: 400px; margin-left: 230px">
								<div class="input-group" >
									<span class="input-group-addon">登录密码（必填）</span> 
									<input value="${userinfo.password }" name="password" class="form-control" placeholder="请输入登录密码" required="required">
								</div>
							</div>
							<button class="btn btn-primary" style="width: 400px; margin-top: 30px; margin-left: 230px" type="submit">提交</button>
						</form>
						<button class="btn btn-default" style="width: 400px; margin-top: 20px; margin-left: 230px" onClick="javascript :history.back(-1);">返回</button>
			</div>
					</div>
				</div>
			</div>
			<div class="col-md-2"></div>
		</div>
	</div>
</body>
</html>